package com.cu.jiekong.service;

import com.cu.jiekong.dao.TongdunRiskInfoMapper;
import com.cu.jiekong.model.TongdunRiskInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author jintian
 * @date 22:51
 */
@Service
public class TongDunRiskInfoService {

    @Autowired
    private TongdunRiskInfoMapper tongdunRiskInfoMapper;

    public TongdunRiskInfo queryTongDunRisk(String userName, String identId, String mobile) {
        // TODO 模拟一个同盾风险信息
        TongdunRiskInfo tongdunRiskInfo = new TongdunRiskInfo();
        saveTongdunRiskInfo(tongdunRiskInfo);
        return tongdunRiskInfo;
    }

    public boolean saveTongdunRiskInfo(TongdunRiskInfo tongdunRiskInfo) {
        return tongdunRiskInfoMapper.insert(tongdunRiskInfo) > 0;
    }
}
